package com.aos.erp.manager.model.notice.vo;

import com.aos.erp.common.utils.DateUtils;
import com.aos.erp.manager.enums.NoticeType;
import com.aos.erp.manager.model.notice.NoticeDispenseOrg;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @program: erp
 * @description: 通知公告
 * @author: tanzhiyu
 * @create: 2018-11-01 19:41
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("通知公告参数")
public class NoticeVo implements Serializable {

    @ApiModelProperty(value="公告ID",hidden=true)
    private long id;

    @ApiModelProperty(value = "公告类型：notice为公告；msg为消息",hidden=true)
    private NoticeType noticeType = NoticeType.notice;

    @ApiModelProperty(value = "公告标题, 100字符内",hidden=true)
    private String noticeTitle;

    @ApiModelProperty(value = "公告内容, 5000字符内",hidden=true)
    private String noticeContent;

    @ApiModelProperty(value = "操作人",hidden=true)
    private String optUser;

    @ApiModelProperty(value = "弹窗提示开始时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date tipsStartTime;
    @ApiModelProperty(value = "弹窗提示开始时间——格式化显示",hidden=true)
    private String tipsStartTimeFormat;

    @ApiModelProperty(value = "弹窗提示截止时间",hidden=true)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date tipsEndTime;
    @ApiModelProperty(value = "弹窗提示截止时间——格式化显示",hidden=true)
    private String tipsEndTimeFormat;

    @ApiModelProperty(value = "下发组织数组[{orgType:'jx',orgId:组织ID,orgCode:'组织编号',orgName:'组织名称'}]", hidden = true)
    private List<NoticeDispenseOrg> dispenseOrgList = new ArrayList<>();    // 下发组织列表

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public NoticeType getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(NoticeType noticeType) {
        this.noticeType = noticeType;
    }

    public String getNoticeTitle() {
        return noticeTitle;
    }

    public void setNoticeTitle(String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    public String getNoticeContent() {
        return noticeContent;
    }

    public void setNoticeContent(String noticeContent) {
        this.noticeContent = noticeContent;
    }

    public String getOptUser() {
        return optUser;
    }

    public void setOptUser(String optUser) {
        this.optUser = optUser;
    }

    public Date getTipsStartTime() {
        return tipsStartTime;
    }
    public String getTipsStartTimeFormat() {
        return DateUtils.getTimeString(tipsStartTime);
    }

    public void setTipsStartTime(Date tipsStartTime) {
        this.tipsStartTime = tipsStartTime;
    }

    public Date getTipsEndTime() {
        return tipsEndTime;
    }
    public String getTipsEndTimeFormat() {
        return DateUtils.getTimeString(tipsEndTime);
    }

    public void setTipsEndTime(Date tipsEndTime) {
        this.tipsEndTime = tipsEndTime;
    }

    public List<NoticeDispenseOrg> getDispenseOrgList() {
        return dispenseOrgList;
    }

    public void setDispenseOrgList(List<NoticeDispenseOrg> dispenseOrgList) {
        this.dispenseOrgList = dispenseOrgList;
    }
}
